package com.ss.android.article.common.share.abs;

import com.ss.android.article.common.share.interf.IActionHelper;
import com.ss.android.article.common.share.interf.IShareArticleBean;
import com.ss.android.article.common.share.interf.IShareEntryItemBean;
import com.ss.android.article.common.share.interf.IShareEssayBean;
import com.ss.android.article.common.share.interf.ISharePostBean;
import com.ss.android.article.common.share.interf.IShareUpdateItemBean;
import com.ss.android.article.common.share.log.ShareRespEntry;
import org.json.JSONObject;

public abstract class AbsShareHelper implements IActionHelper {
    public int mShareSource;
    public JSONObject mExtJsonObj;
    public long mAdid;
    public boolean mIsWenda;
    public static ShareRespEntry entry;

    public final void setForumRespEntry(int arg3) {
        ShareRespEntry shareRespEntry = new ShareRespEntry(202, arg3);
        entry = shareRespEntry;
        shareRespEntry.extJsonObj = this.mExtJsonObj;
    }

    public void setAdid(long arg2) {
        this.mAdid = arg2;
    }

    public final void setArticleRespEntry(IShareArticleBean arg5, int arg6) {
        String.valueOf(System.currentTimeMillis());
        ShareRespEntry shareRespEntry = new ShareRespEntry(this.mShareSource, arg6);
        entry = shareRespEntry;
        shareRespEntry.title = arg5.getTitle();
        entry.adId = this.mAdid;
        entry.groupId = arg5.getGroupId();
        entry.itemId = arg5.getItemId();
        entry.extJsonObj = this.mExtJsonObj;
        if(this.mIsWenda) {
            entry.eventName = arg5.getWendaEventName();
        }
    }

    public final void setEntryItemRespEntry(IShareEntryItemBean arg5, int arg6) {
        ShareRespEntry shareRespEntry = new ShareRespEntry(205, arg6);
        entry = shareRespEntry;
        shareRespEntry.pgcId = arg5.getId();
        entry.extJsonObj = this.mExtJsonObj;
    }

    public final void setEssayRespEntry(IShareEssayBean arg5, int arg6) {
        ShareRespEntry shareRespEntry = new ShareRespEntry(this.mShareSource, arg6);
        entry = shareRespEntry;
        shareRespEntry.groupId = arg5.getGroupID();
        entry.extJsonObj = this.mExtJsonObj;
    }

    public final void setPostRespEntry(ISharePostBean arg5, int arg6) {
        int v0 = this.mShareSource <= 0 ? 207 : this.mShareSource;
        ShareRespEntry shareRespEntry = new ShareRespEntry(v0, arg6);
        entry = shareRespEntry;
        shareRespEntry.groupId = arg5.getId();
        entry.gtype = 33;
    }

    public final void setUpdateRespEntry(IShareUpdateItemBean arg5, int arg6) {
        int v2 = 203;
        this.mShareSource = arg5.getItemType() == 200 || arg5.getItemType() == 201 ? v2 : v2;
        ShareRespEntry shareRespEntry = new ShareRespEntry(this.mShareSource, arg6);
        entry = shareRespEntry;
        shareRespEntry.updateId = arg5.getId();
        entry.extJsonObj = this.mExtJsonObj;
    }
}

